class Animal {
  constructor(name, age) {
    this.name = name
    this.age = age
  }

  run() {
  console.log(`${this.name} running !`);
  }
}

const xioabai = new Animal('xiaobai', 8)

console.log(xioabai.name);
xioabai.run();

class Cat extends Animal {
  constructor(name, age, type) {
    super(name, age)
    this.type = type
  }
}

const xiaomao = new Cat('xiaohuang', 8, 'cat')

console.log(xiaomao);